package com.zy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zy.entity.Work;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface WorkMapper extends BaseMapper<Work> {

    /** 根据用户id查询用户30天的考勤记录
     * @author 小宁
     * @date 2021-04-05 16:04
     * @param uid
     * @return java.util.List<com.zy.entity.Work>
     */
    @Select("SELECT date,on_work,off_work FROM `work` WHERE user_id=#{uid} order by date desc LIMIT 0,30")
    public  List<Work> getWorkList(int uid);

}
